package com.javafactroy.kunlong.data.entity.mysql;

import com.javafactroy.kunlong.client.feign.dto.PageInfoDto;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.persistence.Column;
import javax.persistence.Table;

@Data
@Table(name = "information_schema.COLUMNS")
@Accessors(chain = true)
public class MysqlColumns extends PageInfoDto {

    //"TABLE_CATALOG":"def",
    @Column(name = "IS_NULLABLE")
    String nullFlag; //"NO",
    @Column(name = "TABLE_NAME")
    String tableName;

    @Column(name = "TABLE_SCHEMA")
    String dbName;
    @Column(name = "COLUMN_NAME")
    String colName;
    @Column(name = "COLUMN_KEY")
    String colKey;
    // NUMERIC_PRECISION":8,
    //"PRIVILEGES":"select,insert,update,references",
    @Column(name = "COLUMN_COMMENT")
    String comment;
    //"NUMERIC_SCALE":2,
    @Column(name = "COLUMN_TYPE")
    String colType;
    //"GENERATION_EXPRESSION":"",

    @Column(name = "ORDINAL_POSITION")
    String pos;

    @Column(name = "DATA_TYPE")
    String dataType;

    @Column(name = "COLUMN_DEFAULT")
    String colDefault;

    @Column(name = "character_maximum_length")
    Long maxLength;
}
